"""
用面向对象,实现一个学生Python成绩管理系统;
在文件中;学生信息的字段有(班级,学号,姓名, Python成绩)
实现对学生学生的信息存储信息及成绩的增,删,改,查方法;
"""

class System(object):
    def __init__(self, clas, num, name, score):
        self.clas = clas
        self.num = num
        self.name = name
        self.score = score

    def add(self, s):
        self.score.append(s)

    def remove(self, i):
        self.score.pop(i)

    def change(self, i, new_score):
        self.score[i] = new_score

    def check(self):
        print(self.score)


stu1 = System('nd2102','0202','cyz', [1,2,3])
stu1.add(4)
stu1.check()
stu1.remove(0)
stu1.check()

